package com.onepiece.shipelves.common.canal;

/**
 * canal-server发往MQ的模型
 * @author guoyanjiang
 * @date 2020/5/23
 */
public class BinlogNotify {

    /**
     * 实例从启动到现在收到的消息数（实例重启时置零）
     */
    private long id;

    /**
     * 是否是表结构变更
     */
    private boolean isDdl;

    /**
     * 数据库名
     */
    private String database;

    /**
     * 表名
     */
    private String table;

    /**
     * 变更类型 有 UPDATE,INSERT,DELETE
     */
    private String type;

    /**
     * 两个时间 es比ts略早一点 单位：毫秒
     */
    private long es;
    private long ts;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public boolean isDdl() {
        return isDdl;
    }

    public void setDdl(boolean ddl) {
        isDdl = ddl;
    }

    public String getDatabase() {
        return database;
    }

    public void setDatabase(String database) {
        this.database = database;
    }

    public String getTable() {
        return table;
    }

    public void setTable(String table) {
        this.table = table;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public long getEs() {
        return es;
    }

    public void setEs(long es) {
        this.es = es;
    }

    public long getTs() {
        return ts;
    }

    public void setTs(long ts) {
        this.ts = ts;
    }
}
